﻿@using KPIS.GERP.Models
@using KPIS.GERP.Models.ICM
@model KPIS.GERP.Models.ICM.Movement

@{
    string dt = DateTime.Now.ToString("dd/MM/yy");
}

@if (ViewContext.RouteData.Values["action"].ToString().ToLower() == "edit")
{
    @Html.HiddenFor(model => model.MovementId)
}
@Html.HiddenFor(model => model.RecordStatus)
@Html.HiddenFor(model => model.CreatedWhen)
@Html.HiddenFor(model => model.CreatedBy)
@Html.HiddenFor(model => model.UpdatedBy)
@Html.HiddenFor(model => model.UpdatedWhen)
@Html.Hidden("date",dt)

<div class="widget-box">
    <div class="widget-header">
        <h4>เพิ่มข้อมูลการโอนย้าย</h4>
    </div>
    <div class="widget-body">
        <div class="widget-body-inner">
            <div class="widget-main">

                <div class="control-group">
                    <div class="control-label">
                        วันที่ทำรายการ :
                    </div>
                    <div class="controls">
                        @Html.TextBoxFor(model => model.CreatedWhen, new {id="txtCreatedWhen", @readonly = "true" })
                    </div>
                </div>

                <div class="control-group">
                    <div class="control-label">
                        เรื่อง :
                    </div>
                    <div class="controls">
                        @Html.TextBoxFor(model => model.Title, new { style = "width:450px;" })
                        @Html.ValidationMessageFor(model => model.Title)
                    </div>
                </div>

                <div class="control-group">
                    <div class="control-label">
                        ประเภทพัสดุ :
                    </div>
                    <div class="controls">
                        @Html.DropDownListFor(m => m.ResTypeId, new KPIS.GERP.WEB.GIMS.MasResourceService.MasResourceServiceClient().SelectListResourceType(null))
                    </div>
                </div>

                <div class="control-group">
                    <div class="control-label">
                        รหัสอ้างอิง :
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.RefNo)
                        @Html.ValidationMessageFor(model => model.RefNo)
                    </div>
                </div>

                <div id="edit-diable1">
                    <div class="control-group">
                        <div class="control-label">
                            วิธีการโอนย้าย :
                        </div>
                        <div class="controls">
                            <div class="controls-field-from-group" style="width: 600px;">
                                <div class="controls-field-from-left" style="float: left; width: 200px;">
                                    <label></label>
                                    @Html.RadioButtonFor(m => m.MoveMethod, 1, new { id = "Method0" })
                                    <span class="lbl">จากคลังไปคลัง</span>
                                </div>

                                <div class="controls-field-from-left" style="float: left; width: 200px;">
                                    <label></label>
                                    @Html.RadioButtonFor(m => m.MoveMethod, 2, new { id = "Method1" })
                                    <span class="lbl">จากหน่วยงานไปคลัง</span>
                                </div>
                                <div class="clear" style="clear: both; width: 0px; height: 0px;"></div>
                            </div>
                        </div>
                    </div>

                    <div class="control-group">
                        <div class="controls-field-from-group" id="GroupWh" style="width: 1300px;">
                            <div class="controls-field-from-left" style="float: left; width: 400px;">
                                <div class="control-label">
                                    สถานที่ต้นทาง :
                                </div>
                                <div class="controls">
                                    @Html.DropDownListFor(m => m.SourceWarehouseId, new KPIS.GERP.WEB.GIMS.WarehouseService.WarehouseServiceClient().SelectListWarehouse(null))
                                    @Html.ValidationMessageFor(model => model.SourceWarehouseId)
                                </div>
                            </div>
                        </div>

                        <div class="controls-field-from-group" id="GroupDes" style="width: 1300px;">
                            <div class="controls-field-from-left" style="float: left; width: 400px;">
                                <div class="control-label">
                                    สถานที่ต้นทาง :
                                </div>
                                <div class="controls">
                                    @Html.DropDownListFor(m => m.SourceJobSiteId, new KPIS.GERP.WEB.GIMS.JobsiteService.JobsiteServiceClient().LoadJobSiteSelectList(null, false))
                                    @Html.ValidationMessageFor(model => model.SourceJobSiteId)
                                </div>
                            </div>
                        </div>

                        <div class="controls-field-from-right" style="float: left; width: 400px;">
                            <div class="control-label">
                                สถานที่ปลายทาง :
                            </div>
                            <div class="controls">
                                @Html.DropDownListFor(m => m.DestinationWarehouseId, new KPIS.GERP.WEB.GIMS.WarehouseService.WarehouseServiceClient().SelectListWarehouse(null))
                                @Html.ValidationMessageFor(model => model.DestinationWarehouseId)
                            </div>
                        </div>
                    </div>
                </div>

                <div class="clear" style="clear: both; width: 0px; height: 0px;"></div>

                <div class="control-group">
                    <div class="control-label">
                        หมายเหตุ :
                    </div>
                    <div class="controls">
                        @Html.TextAreaFor(model => model.Remark, new { style = "width:620px; height: 90px;" })
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
